package com.mdb.open.epay.rabbit.consumer;

import com.mdb.bc.api.data.ResultEx;
import com.mdb.open.epay.facade.epay.TradeFacade;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;

@Log4j2
//@Component
public class RetryQpRefundOrderConsumer {

    @Autowired
    private TradeFacade tradeFacade;

//    @LogAnnotation("重試超時退款+撤銷訂單")
//    @RabbitListener(queues = RabbitConfig.QUEUE_EPAY_QPREFUND_ORDER_RETRY, errorHandler = "defaultErrorHandler")
//    @RabbitHandler
    public void epayQpRefundOrderRetry(String innerOrderNo) {
        ResultEx result = tradeFacade.retryQpRefundOrder(innerOrderNo);
        log.info("重試超時退款+撤銷訂單結果：" + result);
    }
}
